package com.xinqi.modules.chat.enums.group;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BasicEnum;
import lombok.Getter;

/**
 * @version V1.0
 * @Title: 群组类型
 * @ClassName: com.xinqi.modules.chat.enums.group.GroupTypeEnum.java
 * @Description:
 * @Copyright 星齐科技（云南）有限公司 - Powered By 技术部
 * @author: yyzhen
 * @date: 2023/8/22 10:52
 */
public enum GroupTypeEnum implements BasicEnum {


    ORDINARY(1, "普通群"),

    /**
     * 后台管理创建
     */
    CUSTOMER_SERVICE(2, "客服群");

    @Getter(onMethod_ = {@JsonValue})
    private final int code;

    @Getter
    private final String describe;

    GroupTypeEnum(int code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static GroupTypeEnum of(Integer code) {
        return BasicEnum.of(GroupTypeEnum.class, code);
    }
}
